import request from '@/utils/request'

export default function loginjs(){
    const signUpButton = document.getElementById('signUp');
    const signInButton = document.getElementById('signIn');
    const container = document.getElementById('dowebok');

    signUpButton.addEventListener('click', function () {
        container.classList.add('right-panel-active')
    })

    signInButton.addEventListener('click', function () {
        container.classList.remove('right-panel-active')
    })
}

// 注册方法
export function register(data) {
    return request({
        url: 'http://localhost:20000/users/reg',
        headers: {
            isToken: false
        },
        method: 'post',
        data: data
    })
}
